// 此文件用于编辑模式模版配置侧配置
import {
  tabList,
  tabList2,
  colorList8,
  styleimg8,
  colorList10,
  styleimg10,
  colorList9,
  styleimg9,
  colorList4,
  colorList5,
  colorList6,
  styleimg4,
  styleimg5,
  colorList,
  colorInfo,
  fontSizeList,
  fontFamilyList,
  styleimg,
  colorList11,
  moduleType,
  SubunitList,
  moduleType4,
  SubunitList4,
  colorList15,
  SubunitList15,
  colorList13,
  SubunitList13,
} from '@/pages/templatePage/data';

import { colorList16, template16Styleimg, SubunitList16 } from '@/pages/templatePage/template16/color';
import { template14ColorList, template14Styleimg, moduleImg } from '@/pages/templatePage/template14/color';
import { template18ColorList, template18Styleimg, template18ModuleImg } from '@/pages/templatePage/painting/data';
const getGlobalTabList = (templateId?: number | string) => {
  //设置全局设置中各tab的显示或隐藏
  let arr = {
    colorShow: true, //颜色展示
    sizeShow: false, //字体选择展示
    styleShow: true, //风格样式
  };
  return arr;
};
const getLogoTabList = (templateId?: number | string) => {
  //设置logo设置中各tab的显示或隐藏
  let arr = {
    LogoShow: true, //logo上传功能
    banner: true, //轮播图功能
    wapBanner: true, //移动端轮播图上传
  };
  return arr;
};
const getEditRightTab = (templateId: number | string) => {
  //配置右侧侧边栏配置图表
  if (
    templateId == 395741054230597 ||
    templateId == 410276243316805 ||
    templateId == 666 ||
    templateId == 123456789 ||
    templateId == 99999 ||
    templateId == 1010 ||
    templateId == 888 ||
    templateId == 1997
  ) {
    return tabList2; //不包含首页样式
  } else {
    return tabList;
  }
};
const getGlobalColor = (templateId: number | string) => {
  let setting = {
    templateColorList: [],
    templateStyleimg: [],
  };
  //获取全局颜色以及图标样式表
  switch (templateId) {
    case 410276336631877:
      setting.templateColorList = colorList4;
      setting.templateStyleimg = styleimg4;
      break;
    case 666:
      setting.templateColorList = colorList6;
      break;
    case 1997:
      setting.templateColorList = colorList5;
      setting.templateStyleimg = styleimg5;
      break;
    case 99999:
      setting.templateColorList = colorList9;
      setting.templateStyleimg = styleimg9;
      break;
    case 888:
      setting.templateColorList = colorList8;
      setting.templateStyleimg = styleimg8;
      break;
    case 1010:
      setting.templateColorList = colorList10;
      setting.templateStyleimg = styleimg10;
      break;
    case 123456789:
      setting.templateColorList = colorList11;
      setting.templateStyleimg = [];
      break;
    case 2001:
      setting.templateColorList = colorList15;
      setting.templateStyleimg = [];
      break;
    case 2013:
      setting.templateColorList = colorList13;
      setting.templateStyleimg = [];
      break;
    case 503306628902981:
      setting.templateColorList = template14ColorList;
      setting.templateStyleimg = template14Styleimg;
      break;
    case 505022027386949:
      setting.templateColorList = colorList16;
      setting.templateStyleimg = template16Styleimg;
      break;
    case 507481625702469:
      setting.templateColorList = template18ColorList;
      setting.templateStyleimg = template18Styleimg;
      break;
    default:
      setting.templateColorList = colorList;
      setting.templateStyleimg = styleimg;
      break;
  }
  return setting;
};
//获取单元样式配置列表
const getUnitStyle = (templateId: number | string) => {
  let unitList = [];
  switch (templateId) {
    case 410276336631877:
      unitList = SubunitList4;
      break;
    case 503306628902981:
      unitList = moduleImg;
      break;

    case 505022027386949:
      unitList = SubunitList16;
      break;

    case 2001:
      unitList = SubunitList15;
      break;
    case 2013:
      unitList = SubunitList13;
      break;
    case 507481625702469:
      unitList = template18ModuleImg;
      break;

    default:
      unitList = SubunitList;
      break;
  }
  return unitList;
};

export { getEditRightTab, getGlobalColor, getUnitStyle, getGlobalTabList, getLogoTabList };
